home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_dlog_deadend.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  114 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # shs_Dlog_deadend.cog   Say the line, Indy.  
  5. #
  6. # [JWC]
  7. #
  8. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  9. #
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14. message     startup
  15. message     entered
  16.                                                           
  17.  
  18. sound        in_deadend=Ss06j03.wav            local
  19.  
  20. surface     trigger
  21.  
  22. thing        indy   
  23. thing        player            local
  24. thing       cam1
  25. thing        c1_t1
  26. thing        c1_t2
  27. thing         dummy
  28. thing        look_window
  29.  
  30. int            curCam            local
  31. int            played=0        local
  32. int            in_rotRate        local
  33.  
  34.  
  35. end
  36.  
  37. # ========================================================================================
  38.  
  39. code
  40.  
  41. startup:
  42.     
  43.           
  44.     player = GetLocalPlayerThing();
  45.     curCam = GetCurrentCamera();
  46.     return;
  47.  
  48.  
  49. entered:
  50.     
  51.     if ((GetSenderRef() == trigger) && (played == 0)) 
  52.     {
  53.         played=1;
  54.  
  55.         MakeMeStop();
  56.         StartCutscene(1);
  57.         SetThingFlags(player, 0x80000); # hide him
  58.         CopyPlayerHolsters(player, indy);    # make sure our actor has matching props
  59.         ClearThingFlags(indy, 0x80000); # reveal our actor
  60.         
  61.       
  62.         # Prep camera & cut...
  63.         SetCameraLookInterp(2, 0);            # kill pan & tilt to lock on 2nd target
  64.         SetCameraPosInterp(2, 0);            # kill dolly mode too
  65.         SetCameraFocus(2, cam1);
  66.         SetCameraSecondaryFocus(2, c1_t1);
  67.         Sleep(0.01);
  68.         SetCurrentCamera(2);
  69.         SetCameraFOV(60, 0, 0.0);
  70.         sleep(.5);
  71.         
  72.         # "This is a deadend..."
  73.         PlayVoice(indy, in_deadend, 1.0, 0);
  74.         Sleep(1);
  75.          
  76.         # Indy look at window
  77.         in_rotRate = GetThingMaxRotVel(indy);     # remember Indy rate
  78.         SetThingMaxRotVel(indy, 10.0);
  79.         AISetLookThing(indy, look_window);        
  80.  
  81.         # Pan and show window
  82.         SetCameraLookInterp(2, 1); # pan & tilt
  83.         SetCameraInterpSpeed(2, 2.5);
  84.         Sleep(0.01);
  85.         SetCameraSecondaryFocus(2, c1_t2);
  86.         SetCameraFOV(50, 1, 2.5);
  87.         Sleep(3.0);
  88.  
  89.         
  90.         # Cleanup
  91.         
  92.         SetThingMaxRotVel(indy, in_rotRate);# reset indy rotate velocity
  93.         CopyOrientAndPos(indy, player); # move player to actor's spot
  94.         SetThingFlags(indy, 0x80000); # hide actor    
  95.         ClearThingFlags(player, 0x80000); # player visible
  96.         
  97.         SetCameraPosition(1, GetThingPos(dummy)); # prep to swing back to follow-cam
  98.         SetCameraLookInterp(2, 0); # kill pan & tilt mode
  99.         SetCameraPosInterp(2, 0); # kill dolly mode
  100.         sleep(.01);
  101.         ResetCameraFOV(0, 0.0);
  102.         SetCurrentCamera(1);  
  103.         ResetCameraFOV(0, 0.0);
  104.         ClearActorFlags(player, 0x200000);
  105.         EndCutscene();    
  106.     
  107.     }
  108.     
  109. return;
  110.      
  111.   
  112.  
  113. end
  114.